Trigger batch execution from DXL

Hello All,

I triggered external exe (.bat files) from dxl with 'system' command. Here adding to this we need to pass some arguments to the external batch file.

Can anyone pour some ideas on how to achieve this.

Hereby mentioned the sample code i use:

system "C:\\windows\\system32\\cmd.exe /c"  "D:\\Simple.bat"

Adding some params to this, what could be change needed

Thanks!!


Adminani - Tue May 05 07:21:33 EDT 2015

Re: Trigger batch execution from DXL
rationaldoors - Tue May 05 14:47:12 EDT 2015

if command line is d:\simple.bat  inputa inputb

and simple bat is as follows you will get output of simple inputa inputb

 

'simple.bat

' %0 is the program name as it was called,
' %1 is the first command line parameter,
' %2 is the second command line parameter,
' and so on till %9.
echo off
echo  %0
echo  %1
echo  %2